package com.zhanglijie.theory.future;

/**
 * @author zhanglijie
 * @version 1.0
 * @since 1.1.0 2022/8/14 0014 23:45
 */
public class RealProduct implements Product{
    private final String content;
    public RealProduct(int count,char c){
        char[] chars = new char[count];
        for (int i = 0; i < count; i++) {
            chars[i] = c;
            try {
                Thread.sleep(100);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        content = new String(chars);
    }
    @Override
    public String getContent() {
        return this.content;
    }
}
